/**
 * 
 */
package com.isaac.actm.domain.repository.jpa;

import java.util.Date;

import org.springframework.transaction.annotation.Transactional;

import com.isaac.actm.domain.pojo.User;
import com.isaac.actm.domain.repository.UserRepository;

/**
 * @author ybak
 * 
 */
@Transactional
public class JPAUserRepositoryImpl extends JPARepositoryImpl<User> implements UserRepository {

    @Override
    public void save(User entity) {
        if (entity.getId() == null) {
            entity.setCreateTime(new Date());
        }
        super.save(entity);
    }

}
